package com.stars.easyms.logger.support.logback.util;

import java.util.List;

/**
 * <p>className: EasyMsEventByteHolder</p>
 * <p>description: EasyMs日志事件解析的byte数组的holder类</p>
 *
 * @author guoguifang
 * @date 2019-11-06 19:18
 * @since 1.3.3
 */
public final class EasyMsEventByteHolder {

    private static final ThreadLocal<List<byte[]>> EVENT_BYTE_LIST_HOLDER = new ThreadLocal<>();

    public static void setEventByteList(List<byte[]> byteList) {
        EVENT_BYTE_LIST_HOLDER.set(byteList);
    }

    static List<byte[]> getEventByteList() {
        return EVENT_BYTE_LIST_HOLDER.get();
    }

    public static void clear() {
        EVENT_BYTE_LIST_HOLDER.remove();
    }

    private EasyMsEventByteHolder() {
    }
}